<link href="<?= $this->webroot ?>assets/css/colorBox/colorbox.css" rel="stylesheet" type="text/css"/>
<script src="<?= $this->webroot ?>assets/plugins/colorBox/jquery.colorbox.js" type="text/javascript"></script>

<div class="col-md-12">
<div class="portlet">
	<div class="portlet-title">
		<div class="caption"> <i class="fa fa-cogs"></i><?= __('Danh Sách Hình Ảnh'); ?> </div>
		<div class="tools"> </div>
	</div>
	<div class="portlet-body">
		<div class="table-toolbar">

			<label class="btn-group mt5 mb5 mr5"><?= __('Danh mục'); ?></label>
			<div class="btn-group mt5 mb5">
				<?php echo $this->Form->input($als.'.target_id', array( 'label' => false, 'div' => false, 'class' => 'form-control', 'options' => array('partners' => 'Đối tác', 'slider' => 'Slider'), 'default' => $target_id, 'data-mode' => 'images') )?>
			</div>

			<div class="btn-group pull-right mt5 mb5">
				<a href="<?= $this->webroot.'admin/images/add/'.$target_id ?>" class="btn btn-success"> <?= __('Thêm mới')?> <i class="fa fa-plus"></i></a>
			</div>
		</div>

		<div class="clearfix line mb20" ></div>

		<div class="table-responsive clearfix">

			<div class="row tc-gallery">
				<?php $i = 0; foreach($images as $img): $i++?>
				<div class="col-sm-7 col-md-2 item" id="<?php echo $img['Image']['id']; ?>" data-als="<?= $als ?>">
					<div class="thumbnail">
						<a href="<?php echo PUBLIC_DETAIL_SHOW. $img['Image']['image'] ?>" data-rel="colorbox">
						<img src="<?php echo PUBLIC_THUMB_SHOW. $img['Image']['image'] ?>" alt="...">
						</a>

						<div class="tools tools-bottom">
							<a href="#"> <i class="fa fa-times text-white"></i> </a>
						</div>
					</div>
				</div>

				<?php if($i == 6) : $i = 0;?>
				<div class="clearfix"></div>
				<?php endif; ?>
				<?php endforeach;?>
			</div>

		</div>
	</div>
</div>
</div>
